//run like this scala usePoint
//if in package: pack, then like this:  scala pack.usePoint

//compile like this scalac point.scala

class Point(xc:Int, yc:Int) {
      var x:Int = xc;
      var y:Int = yc;
      def move(dx:Int, dy:Int): Unit = {
      	  x = x + dx;
	  y = y + dy;	  
      }
      def test(): Unit = { 
	  println("test called..");
      }
      override def toString(): String = "(" + x + ", " + y + ")";
}

object usePoint extends App {
       var point1 = new Point(1,1);
       var point2 = new Point(2,2);
       Console.println("here is point1: "+point1);
       Console.println("here is point2: "+point2);
	//point1.test() {println("execution wihtin brackets after call of test...") };
}
